
        document.getElementById('chatForm').addEventListener('submit', function(e) {
            e.preventDefault();
            const input = document.querySelector('.chat-input');
            const messageContainer = document.querySelector('.message-container');

            // 添加用户消息
            const userMessage = document.createElement('div');
            userMessage.className = 'user-message';
            userMessage.innerHTML = `
                <div class="user-message-content">
                    <p>${input.value}</p>
                    <div class="text-light" style="font-size:0.875rem">${new Date().toLocaleTimeString()}</div>
                </div>
                <div class="user-avatar avatar">
                    <!-- 用户头像SVG -->
                </div>
            `;
            messageContainer.appendChild(userMessage);

            // 模拟机器人回复
            setTimeout(() => {
                const botMessage = document.createElement('div');
                botMessage.className = 'bot-message';
                botMessage.innerHTML = `
                    <div class="bot-avatar avatar">
                        <!-- 机器人头像SVG -->
                    </div>
                    <div class="bot-message-content">
                        <p>这是模拟回复内容...</p>
                        <div class="text-muted" style="font-size:0.875rem">${new Date().toLocaleTimeString()}</div>
                    </div>
                `;
                messageContainer.appendChild(botMessage);
                messageContainer.scrollTop = messageContainer.scrollHeight;
            }, 1000);

            input.value = '';
            messageContainer.scrollTop = messageContainer.scrollHeight;
        });
